<?php
namespace API\Controller;
use Think\Controller;
class PostController extends Controller {
    public function getpost(){
        $user=M('post');
        $data=$user->order("iid")->select();
        echo json_encode($data);
   

    }
    public function getpostbyid(){
    	$iid=$_GET['iid'];
        $user=M('post');
        $data=$user->where("iid=$iid")->select();
        echo json_encode($data);
   

    }
   public function getuserbyname(){
    	/*$uname=$_GET['uname'];
        $user=M('user');
        $data=$user->where("uname=$uname")->select();
        echo json_encode($data);
   */

    } 
}